package com.fafi.selfmvc.convertor;

import org.springframework.util.StringUtils;

import java.beans.PropertyEditorSupport;
import java.math.BigDecimal;

public class NumberEditor extends PropertyEditorSupport {
	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		String newStr = StringUtils.deleteAny(text,",");

		BigDecimal b = new BigDecimal(newStr);
		setValue(b);

	}
}
